.class public Lcom/instagram/android/util/ah;
.super Ljava/lang/Object;
.source "SearchSession.java"


# instance fields
.field private a:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private b:Z

.field private c:Z


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 17
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 18
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    .line 19
    return-void
.end method


# virtual methods
.method public a(ZLcom/instagram/android/d/b/c;)Lcom/instagram/android/d/b/c;
    .locals 6
    .parameter
    .parameter

    .prologue
    const/4 v2, 0x0

    .line 62
    if-eqz p1, :cond_1

    move v1, v2

    .line 63
    :goto_0
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_3

    .line 64
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 65
    iget-object v3, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    add-int/lit8 v3, v3, -0x1

    if-ne v1, v3, :cond_0

    .line 66
    const-string v3, "q"

    invoke-virtual {p2, v3, v0}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 63
    :goto_1
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    .line 68
    :cond_0
    const-string v3, "pq_%d"

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/Object;

    add-int/lit8 v5, v1, 0x1

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v4, v2

    invoke-static {v3, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p2, v3, v0}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    .line 73
    :cond_1
    invoke-virtual {p0}, Lcom/instagram/android/util/ah;->a()Ljava/lang/String;

    move-result-object v0

    .line 74
    invoke-virtual {p0}, Lcom/instagram/android/util/ah;->b()Ljava/lang/String;

    move-result-object v1

    .line 75
    if-eqz v0, :cond_2

    .line 76
    const-string v2, "q"

    invoke-virtual {p2, v2, v0}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 78
    :cond_2
    if-eqz v1, :cond_3

    .line 79
    const-string v0, "pq"

    invoke-virtual {p2, v0, v1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 82
    :cond_3
    const-string v0, "npq"

    iget-object v1, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v0, v1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 83
    return-object p2
.end method

.method public a()Ljava/lang/String;
    .locals 2

    .prologue
    .line 30
    const/4 v0, 0x0

    .line 31
    iget-object v1, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-lez v1, :cond_0

    .line 32
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 34
    :cond_0
    return-object v0
.end method

.method public a(Z)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 87
    new-instance v0, Lcom/instagram/android/d/b/c;

    invoke-direct {v0}, Lcom/instagram/android/d/b/c;-><init>()V

    invoke-virtual {p0, p1, v0}, Lcom/instagram/android/util/ah;->a(ZLcom/instagram/android/d/b/c;)Lcom/instagram/android/d/b/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/d/b/c;->g()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public a(Lcom/instagram/android/model/b/e;)V
    .locals 4
    .parameter

    .prologue
    const/4 v2, 0x1

    .line 92
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_0

    .line 105
    :goto_0
    return-void

    .line 95
    :cond_0
    iput-boolean v2, p0, Lcom/instagram/android/util/ah;->b:Z

    .line 96
    iput-boolean v2, p0, Lcom/instagram/android/util/ah;->c:Z

    .line 97
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "signals/sq/users/follow/?"

    invoke-static {v1}, Lcom/instagram/android/d/i/c;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 99
    new-instance v1, Lcom/instagram/android/d/b/c;

    invoke-direct {v1}, Lcom/instagram/android/d/b/c;-><init>()V

    invoke-virtual {p0, v2, v1}, Lcom/instagram/android/util/ah;->a(ZLcom/instagram/android/d/b/c;)Lcom/instagram/android/d/b/c;

    move-result-object v1

    .line 100
    const-string v2, "u"

    invoke-virtual {p1}, Lcom/instagram/android/model/b/e;->k()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 102
    invoke-virtual {v1}, Lcom/instagram/android/d/b/c;->g()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 104
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/util/x;->a(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public a(Ljava/lang/String;)V
    .locals 1
    .parameter

    .prologue
    .line 22
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 23
    return-void
.end method

.method public b()Ljava/lang/String;
    .locals 3

    .prologue
    .line 38
    const/4 v0, 0x0

    .line 39
    iget-object v1, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    const/4 v2, 0x1

    if-le v1, v2, :cond_0

    .line 40
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x2

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 42
    :cond_0
    return-object v0
.end method

.method public b(Ljava/lang/String;)V
    .locals 3
    .parameter

    .prologue
    const/4 v2, 0x1

    .line 117
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_0

    .line 129
    :goto_0
    return-void

    .line 120
    :cond_0
    iput-boolean v2, p0, Lcom/instagram/android/util/ah;->b:Z

    .line 121
    iput-boolean v2, p0, Lcom/instagram/android/util/ah;->c:Z

    .line 122
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "signals/sq/tags/click/?"

    invoke-static {v1}, Lcom/instagram/android/d/i/c;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 124
    new-instance v1, Lcom/instagram/android/d/b/c;

    invoke-direct {v1}, Lcom/instagram/android/d/b/c;-><init>()V

    invoke-virtual {p0, v2, v1}, Lcom/instagram/android/util/ah;->a(ZLcom/instagram/android/d/b/c;)Lcom/instagram/android/d/b/c;

    move-result-object v1

    .line 125
    const-string v2, "tag"

    invoke-virtual {v1, v2, p1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 126
    invoke-virtual {v1}, Lcom/instagram/android/d/b/c;->g()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 128
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/util/x;->a(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public c()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 50
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 51
    iput-boolean v1, p0, Lcom/instagram/android/util/ah;->b:Z

    .line 52
    iput-boolean v1, p0, Lcom/instagram/android/util/ah;->c:Z

    .line 53
    return-void
.end method

.method public d()V
    .locals 1

    .prologue
    .line 56
    iget-boolean v0, p0, Lcom/instagram/android/util/ah;->b:Z

    if-eqz v0, :cond_0

    .line 57
    invoke-virtual {p0}, Lcom/instagram/android/util/ah;->c()V

    .line 59
    :cond_0
    return-void
.end method

.method public e()V
    .locals 2

    .prologue
    .line 108
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_0

    .line 114
    :goto_0
    return-void

    .line 111
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "signals/sq/users/fail/?"

    invoke-static {v1}, Lcom/instagram/android/d/i/c;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 112
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/instagram/android/util/ah;->a(Z)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 113
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/util/x;->a(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public f()V
    .locals 2

    .prologue
    .line 132
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_0

    .line 138
    :goto_0
    return-void

    .line 135
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "signals/sq/tags/fail/?"

    invoke-static {v1}, Lcom/instagram/android/d/i/c;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 136
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/instagram/android/util/ah;->a(Z)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 137
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/util/x;->a(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public g()Z
    .locals 1

    .prologue
    .line 150
    iget-object v0, p0, Lcom/instagram/android/util/ah;->a:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_0

    iget-boolean v0, p0, Lcom/instagram/android/util/ah;->c:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method
